package src.messagesToServer;

import src.dataStructures.DataType;
import src.messagesToClient.MessageToClient;
import src.serverSide.Control;

/**
 * This class is a command to the server to get an user list with the given parameters
 * @author John Stewart
 */
public class GetSubnameList extends MessageToServer {
	public boolean redoable = true;
	
	private String start;
	private int maxlength;
	private DataType type;

	public GetSubnameList(String start, int maxlength, DataType type) {
		this.start = start;
		this.maxlength = maxlength;
		this.type = type;
	}

	@Override
	public MessageToClient execute(String address, Control control) {
		return control.getSubNameList(start, maxlength, type);
	}

}
